#!/usr/local/bin/python3
# -*- coding: UTF-8 -*-

import sys
import os
import json

import shutil
import zipfile
import time
class LinearMap(object):
    """ 线性表结构 """
    def __init__(self):
        self.items = []
    
    def add(self, k, v):    # 往表中添加元素
        self.items.append((k,v))
    
    def get(self, k):       # 线性方式查找元素
        for key, val in self.items:
            if key==k:      # 键存在，返回值，否则抛出异常
                return val
        return "KeyError"